1. Field of the Invention
The present invention generally relates to an optimization apparatus, a compiler program, an optimization method, and a recording medium. More particularly, the present invention relates to an optimization apparatus, a compiler program, an optimization method, each comprising changing the order of execution of instructions, and a recording medium on which the compiler program is recorded.
2. Description of the Related Art
A method of speculative code movement in which the order of execution of instructions is changed in disregard of a conditional branch instruction or the like is proposed in “Eliminating Exception Checks and Partial Redundancies for Java Just-in-Time Compilers” written by Motohiro Kawahito, Hideaki Komatsu, and Toshio Nakatani and contained in TRL Research Report RT0350 2000.
In the above-described method, however, the order of execution of memory access instructions having a possibility to cause an exception cannot be changed so that the memory access instruction is speculatively executed. For this reason, various kinds of optimization enabled by changing the order of execution of memory access instructions cannot be performed.